package com.example.demorabbitmqlisten.rabbitmq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

@Service
public class KeShiKuCunService implements SpdCloudMqOperationService {
    @Autowired
    private KeShiKuCunServiceImpl keShiKuCunServiceImpl;
    @PostConstruct
    public void init(){
        System.out.println("KeShiKuCunService已注入");
    }

    @Override
    public boolean handle(MqBaseMessage.MessageHeader messageHeader, String json) {
        keShiKuCunServiceImpl.save(json);
        return true;
    }
}
